﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

using System;
using System.Collections.Generic;
using System.IO;
using ScrumTable.Common.Test;

#endregion

namespace ScrumTable.Common.Excel.Test
{
    /// <summary>
    /// Contains the global resources required for the current
    /// test library.
    /// </summary>
    public static class Resources
    {
        #region Declarations
        //--------------------------------------------------------------------
        // Declarations
        //--------------------------------------------------------------------

        internal const string ThirdWorksheetName = "Third Sheet";
        internal const string SecondWorksheetName = "Second Sheet";

        internal const string SecondSheetStartDateFieldName = "Start Date";
        internal const string SecondSheetEndDateFieldName = "End Date";
        internal const string SecondSheetNameFieldName = "Name";

        internal static readonly string[] ThridSheetHeaderNames = new[]
        {
            "ID",
            "Name",
            null, // 2. column has no header value -> dynamic allocated to "Column1"
            "Ref ID Second Sheet",
            "Description",
            "Value Field1",
            "Value Field2",
            "Value Field3",
            "Ref ID Invalid",
            "Name_1"
        };

        internal static readonly int[] ThirdSheetColumnIndexes = new[]
        {
            0,
            1,
            2, // 2. column has no header value -> dynamic allocated to "Column1"
            3, 
            4,
            5,
            6,
            7,
            8,
            9
        };

        internal static readonly int ThirdSheetColumnCount;

        internal static readonly string[] WorksheetNames = new[]
        {
            "First Sheet",
            SecondWorksheetName,
            ThirdWorksheetName
        };

        private const string TestDataFile = "ScrumTable.Common.Excel.TestData.xlsx";

        #endregion

        #region Properties
        //--------------------------------------------------------------------
        // Properties
        //--------------------------------------------------------------------

        #endregion

        #region Constructors / Destructor
        //--------------------------------------------------------------------
        // Constructors / Destructor
        //--------------------------------------------------------------------

        /// <summary>
        /// Static constructor for local variable initialization.
        /// </summary>
        static Resources()
        {
            ThirdSheetColumnCount = ThirdSheetColumnIndexes.Length;
        }

        #endregion

        #region Methods
        //--------------------------------------------------------------------
        // Methods
        //--------------------------------------------------------------------

        public static string GetProjectTestDataFilePath(string testDir)
        {
            return ResourceUtil.CombineToProjectPath(
                testDir,
                TestDataFile);
        }

        #endregion
    }
}
